package com.itheima.zuoye1;

import java.util.ArrayList;

public class Test1 {
    public static void main(String[] args) {
        //创建集合Arraylist
        ArrayList<Student> students = new ArrayList<>();
        //存入数据
        students.add(new Student("小亮",99));
        students.add(new Student("小强",85));
        students.add(new Student("小响",90));
        students.add(new Student("小勇",75));

        Student minScore = students.stream().min((s1,s2) -> s1.getScore()> s2.getScore()? 1 : -1).get();
//        System.out.println(minScore);
        students.remove(minScore);
        for (Student student : students) {
            System.out.println("student = " + student);
        }
    }
}
